| Abaqus-PythonAPI Operation Manual | ||||||||||||
| 2022年5月13日 | ||||||||||||
| 0.879861111 | ||||||||||||
| Projectdeployment, Please refer to https://github.com/JiaoranWang/Python-Abaqus.git | ||||||||||||
| The original.PDF of this file is here: | ||||||||||||
| The abaqusmodeling file mentioned is here: | ||||||||||||
| (.ppt): | ||||||||||||
| https://github.com/JiaoranWang/Python-Abaqus/blob/master/Python-Abaqus%20API%20Project/Pics/3%20abaqus%20tutorial.pdf | ||||||||||||
| (.mp4) | ||||||||||||
| AbaqusSimulation Tutorial | ||||||||||||
| 1.intro | ||||||||||||
| Abaquscan automatically generate Python script files with the extension.rpy, it's automatically tracking all the oprations in the CAE inerface.When the task ends, the scripts are saved into .jnl, you can run the file torebuild the model | ||||||||||||
| The"abaqus.rpy" can be automaticallyupdatedaccording to action (checked in notebook++ and Pycharm) | ||||||||||||
| By changingthe parameters and process in it, we can obtain a new model with new job andanalysis. | ||||||||||||
| To be noticed that CAE can onlyrun the plain python scripts in its run shell, which means that: | ||||||||||||
| 1) Python scripts that have judgment statements (because prespacechanges are not recognized) | ||||||||||||
| and 2) reference functions defined in the samefile (CAE does not redirect to relative pathlookup) are not allowed to beimported into CAE to run | ||||||||||||
| =>3) Any references, function definitions and variableinputs need to be in the same script | ||||||||||||
| 2. RunningPython scripts in Abaqus | ||||||||||||
| 2.1 Function structure and specification | ||||||||||||
| For now,we have the following scripts: | ||||||||||||
| Please see the following pic | ||||||||||||
| 1.Environment | ||||||||||||
| 1.1Abaqus Environment: How do I automatically run scriptsin Abaqus | ||||||||||||
| Firstly weneed to check where the 'Abaqus Command' window are. | ||||||||||||
| C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dassault Systemes SIMULIA Established Products 2021 | ||||||||||||
| Mypath is in C:\ProgramData\Microsoft\Windows\StartMenu\Programs\Dassault Systemes SIMULIA Established Products 2021 => "AbaqusCommand.lnk" | ||||||||||||
| The.lnk is the suffix for shortcut,to trace back to the original file, we can right click, then click on the 'Openfile location' | ||||||||||||
| (How do I find the normal location of the shortcut? | ||||||||||||
| https://m33.wiki/help/windows_shortcut_original_file_location.html) | ||||||||||||
| Theoriginal file is a CMD, so wecan open it in Python and type input by feeding .batfile | ||||||||||||
| [Strongly suggestion] Since the.lnk could function well, we can put it directly into the folder where wecalling it to avoid path changing (see the following pic) | ||||||||||||
| Enter theCommand in the Abaqus Command window: | ||||||||||||
| ' | ||||||||||||
| Cd C:\Users\jiaor\PycharmProjects\pythonProject_HP\Python-AbaqusAPI Project\Python-Abaqus API\Exe_Scripts | ||||||||||||
| abaqus cae script=Exe_1.py | ||||||||||||
| ' | ||||||||||||
| I putthem into a .bat file | ||||||||||||
| Todirectly put the path into abaqus cae script could not work: | ||||||||||||
| abaqus caescript=C:\Users\jiaor\PycharmProjects\pythonProject_HP\Python-Abaqus APIProject\Python-Abaqus API\Exe_Scripts\Exe_1.py | ||||||||||||
| ExecuteScripts | ||||||||||||
| [Abaqus]Change/settheworkdictionaryandresults | ||||||||||||
| Created with OneNote. | ||||||||||||